

console.log('預加載脚本',process.version)
const { contextBridge,ipcRenderer } = require("electron") 

contextBridge.exposeInMainWorld("aaa",{
    name:'111',
    age:'12312',
    sex:'女',
    saveFile:(data)=>{
        ipcRenderer.send("save-file",data)
    },
    async readFile(){
        // let data = await ipcRenderer.invoke('read-file','111');
        // console.log(data);
        // return data;
        let data = ipcRenderer.invoke('read-file','111');
        return data;
    }
})